package com.example.seckill.controller;


import com.example.seckill.pojo.User;
import com.example.seckill.rabbitmq.MQSender;
import com.example.seckill.vo.RespBean;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author KingCrimson
 * @since 2022-08-06
 */
@Controller
@RequestMapping("/user")
public class UserController {

    @Autowired
    private MQSender mqSender;


    /**
    * @Description: 用户信息(测试)
    * @Param: 
    * @return: 
    * @Author: KingCrimson
    * @Date: 2022/8/14
    */
    @RequestMapping("/info")
    @ResponseBody
    public RespBean info(User user){
        return RespBean.success(user);
    }

    /**
    * @Description: Rabbitmq发送消息测试
    * @Param: 
    * @return: 
    * @Author: KingCrimson
    * @Date: 2022/8/18
    */
//    @RequestMapping("/mq")
//    @ResponseBody
//    public void mq(){
//        mqSender.sendSeckillMessage("hello!");
//    }

}
